package cmpe273.classproject.server.service;

public class MovieServiceImplProxy implements cmpe273.classproject.server.service.MovieServiceImpl {
  private String _endpoint = null;
  private cmpe273.classproject.server.service.MovieServiceImpl movieServiceImpl = null;
  
  public MovieServiceImplProxy() {
    _initMovieServiceImplProxy();
  }
  
  public MovieServiceImplProxy(String endpoint) {
    _endpoint = endpoint;
    _initMovieServiceImplProxy();
  }
  
  private void _initMovieServiceImplProxy() {
    try {
      movieServiceImpl = (new cmpe273.classproject.server.service.MovieServiceImplServiceLocator()).getMovieServiceImpl();
      if (movieServiceImpl != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)movieServiceImpl)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)movieServiceImpl)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (movieServiceImpl != null)
      ((javax.xml.rpc.Stub)movieServiceImpl)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public cmpe273.classproject.server.service.MovieServiceImpl getMovieServiceImpl() {
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl;
  }
  
  public cmpe273.classproject.server.dto.TransactionResponse getHistory(int memberId) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getHistory(memberId);
  }
  
  public cmpe273.classproject.server.dto.PersonResponse createPerson(cmpe273.classproject.server.model.Person customer) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.createPerson(customer);
  }
  
  public cmpe273.classproject.server.model.Person[] getAllSimpleCustomers() throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllSimpleCustomers();
  }
  
  public cmpe273.classproject.server.dto.PersonResponse deletePerson(long id) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.deletePerson(id);
  }
  
  public cmpe273.classproject.server.dto.MovieResponse createMovie(cmpe273.classproject.server.model.Movie movie) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.createMovie(movie);
  }
  
  public cmpe273.classproject.server.dto.MovieResponse deleteMovie(cmpe273.classproject.server.model.Movie movie) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.deleteMovie(movie);
  }
  
  public cmpe273.classproject.server.dto.MovieResponse issueMovie(cmpe273.classproject.server.model.Movie movie, cmpe273.classproject.server.model.Person person) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.issueMovie(movie, person);
  }
  
  public cmpe273.classproject.server.dto.MovieResponse submitMovie(cmpe273.classproject.server.model.RentalTransaction rt) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.submitMovie(rt);
  }
  
  public cmpe273.classproject.server.model.Person[] getAllPremiumMembers() throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllPremiumMembers();
  }
  
  public cmpe273.classproject.server.dto.MovieResponse getAllMovies() throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllMovies();
  }
  
  public cmpe273.classproject.server.dto.MovieResponse getAllMoviesByPerson(int memberID) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllMoviesByPerson(memberID);
  }
  
  public cmpe273.classproject.server.dto.MovieResponse getAllOutstandingMoviesByPerson(int memberID) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllOutstandingMoviesByPerson(memberID);
  }
  
  public cmpe273.classproject.server.dto.MovieResponse getAllMoviesInCategory(int category) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllMoviesInCategory(category);
  }
  
  public cmpe273.classproject.server.dto.PersonResponse getAllPersons() throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllPersons();
  }
  
  public cmpe273.classproject.server.dto.PersonResponse updatePerson(cmpe273.classproject.server.model.Person person) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.updatePerson(person);
  }
  
  public cmpe273.classproject.server.dto.MovieResponse updateMovie(cmpe273.classproject.server.model.Movie movie) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.updateMovie(movie);
  }
  
  public cmpe273.classproject.server.dto.PersonResponse findPerson(cmpe273.classproject.server.model.Person person) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.findPerson(person);
  }
  
  public cmpe273.classproject.server.model.Movie[] findMovie(cmpe273.classproject.server.model.Movie movie) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.findMovie(movie);
  }
  
  public cmpe273.classproject.server.dto.PersonResponse getAllPersonsByMovie(cmpe273.classproject.server.model.Movie movie) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    return movieServiceImpl.getAllPersonsByMovie(movie);
  }
  
  public void main(java.lang.String[] args) throws java.rmi.RemoteException{
    if (movieServiceImpl == null)
      _initMovieServiceImplProxy();
    movieServiceImpl.main(args);
  }
  
  
}